﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="PromotedCars.ascx.cs" Inherits="CarRental.Controls.PromotedCars" %>

    <div id="promoted-cars">
        <asp:Repeater ID="rptPromotedCarsRepeater" runat="server">
            <ItemTemplate>
                <div class="promoted-car">
                    <div class="car-image">
                        <img src="<%# ((CarRental.ViewModel.CarViewModel)(Container.DataItem)).Images.ElementAt(0).ImageFile %>" alt="<%#Eval("ProducerName")%> <%#Eval("ModelName")%>" />
                    </div>
                    <div class="car-properties">
                        <a href=""><%#Eval("ProducerName")%> <%#Eval("ModelName")%></a>
                        <span><%# DataBinder.Eval(Container.DataItem, "ProductionYear","{0 :yyyy}")%></span>
                    </div>
                </div>
            </ItemTemplate>
        </asp:Repeater>
    </div>
    